//
//  ServerConfigBean.swift
//  imprint
//
//  Created by 小柠檬🍋 on 2025/3/16.
//

import Foundation
class AppUpdate : Codable {
    var appVersionCode: Int? = nil
    var appVersionName: String? = nil
    var downloadApk: String? = nil
    var isForceUpdate: Bool? = nil
    var content: String? = nil
    
    
    func isUpdate() -> Bool {
        let curVersion = getAppVersionAndBuild().version.stringValue.formatVersion()
        if appVersionName.formatVersion() > curVersion {
            return true
        }
        showLog("服务器版本号：\(appVersionName.formatVersion())")
        showLog("当前版本号：\(curVersion)")
        return false
    }

}
